package com.xianrenit.xianrenpuzi.user;

import com.xianrenit.xianrenpuzi.model.entity.h5.UserInfo;
import com.xianrenit.xianrenpuzi.user.service.UserInfoService;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.DigestUtils;

@SpringBootTest
public class UserTesy {
    @Resource
    UserInfoService userInfoService;
    @Test
    public void test(){

        String salt = "9xi6j3";
        UserInfo userInfo = new UserInfo();
        userInfo.setId(1747426561444892673L);
        String encodedPwd = DigestUtils.md5DigestAsHex((DigestUtils.md5DigestAsHex("123456".getBytes()) + salt).getBytes());
        userInfo.setPassword(encodedPwd);
        userInfoService.updateById(userInfo);

    }

}
